package Code_20200407;

    import java.util.Scanner;

    public class Offer_53 {
        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            int len = in.nextInt();
            int[] test = new int[len];
            for (int i = 0; i < len; i++) {
                test[i] = in.nextInt();
            }
        }

        public static int missingNumber(int[] nums){
            int left = 0,right = nums.length - 1;
            while(left <= right ){
                int mid = (left + right) / 2;
                if(nums[mid] == mid) left = mid + 1;
                else right = mid - 1;
            }
            return left;
        }
}
